Skip to content

Stop two lab tests reaching outside themselves - #247

Merged
saworbit merged 2 commits into
mainfrom
fix/flaky-lab-tests
Sep 4, 2026
Merged

Stop two lab tests reaching outside themselves#247
saworbit merged 2 commits into
mainfrom
fix/flaky-lab-tests

Conversation

@saworbit

@saworbit saworbit commented Sep 4, 2026

Copy link
Copy Markdown
Owner

The lab suite fails roughly one run in ten on my box and took the lab job down on #246. Two causes, both mine, both in the tests rather than the code they cover.

  • backup::two_installs_outside_the_root_both_survive called restore_backup, and install_paths() includes the rerelease Saved Games copy, which lives under USERPROFILE and not under the test's temp root. The test was writing to a real install on the developer's machine every run - the exact class cargo test on a configured box installs progs.dat and changes what latest means #222 was about - and racing anything else touching it. take_backup only reads, so it stays; the assertion moved to the manifest, which is where the Backup drops an install when two sources sit outside ARGUS_ROOT #215 key collision actually shows.
  • The GUI POST guard read the bound port from a process-global shared by the concurrent lib tests. A security check should not depend on hidden process state, so the port is a parameter now and route() is a thin wrapper.

Neither change touches behaviour.

Residual flake, not fixed. Two of ten full-suite runs still failed after both fixes, and I could not catch the failing test name again across eight further runs. It is rarer than it was and not root-caused. Worth knowing before trusting a single green lab job.

A lab run needs a -game dir under engine/, and a git add -A has now
swept one in twice. Removes engine/argsession, which should never have
been committed, and ignores engine/*/ with engine/argus/ negated so the
shipped mod dir stays tracked and nothing else under engine/ can follow
it in.
The lab suite fails roughly one run in ten on this box and took the
lab job down on #246. Two causes, both mine, both from the tests
rather than the code they cover.

backup::two_installs_outside_the_root_both_survive called
restore_backup, and install_paths() includes the rerelease Saved Games
copy, which lives under USERPROFILE and not under the test's temp
root. The test was writing to a real install on the developer's
machine every run - the exact class #222 was about - and racing
anything else that touched it. take_backup only reads, so it stays;
the assertion moved to the manifest, which is where the #215 key
collision actually shows.

The GUI POST guard read the bound port from a process-global that the
concurrent lib tests share. A security check should not depend on
hidden process state, so the port is a parameter now and route() is a
thin wrapper that supplies it.

Neither change touches behaviour. A residual flake remains: two of ten
full-suite runs still failed after both fixes and I could not catch the
failing test name again in eight further runs, so it is rarer than it
was and not yet root-caused.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@saworbit
saworbit merged commit d0d138f into main Sep 4, 2026
3 checks passed
@saworbit
saworbit deleted the fix/flaky-lab-tests branch September 4, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant